﻿//*** Guidance generated code ***//
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;

namespace ProjectBase.Core.Web
{
    /// <summary>
    ///     IViewModel is the base class for MasterPage rendering.
    ///     It contains:
    ///     1) IMasterModel used for basic UI parts (Buttons, Actions, Menu)
    ///     2) the list of Messages, which are rendered if needed
    /// </summary>
    public interface IViewModel : ICoreModel
    {
        /// <summary>
        ///     Model containing all needed data to allow Master Page work
        /// </summary>
        IMasterModel MasterModel { get; set; }

        /// <summary>
        ///     Name of the css class for content area.
        ///     It allows to set different backgrounds for Detail, filter, List etc.
        /// </summary>
        string MasterBodyCssClass { get; set; }

        /// <summary>
        ///     When IsNotEmpty(), its appended to the page head as a scirpt source.
        ///     The result should contain the validation rules:
        ///     validator.rules["LastName"] = { required: true, minlength: 1,maxlength: 50};
        /// </summary>
        string ValidationRulesJS { get; set; }
    }
}